package com.vastcom.sigma.admin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class Refertype {
    private String refertypeid;
    private String basecode;
    private String name;

    @Id
    @Column(name = "refertypeid")
    public String getRefertypeid() {
        return refertypeid;
    }

    public void setRefertypeid(String refertypeid) {
        this.refertypeid = refertypeid;
    }

    @Basic
    @Column(name = "basecode")
    public String getBasecode() {
        return basecode;
    }

    public void setBasecode(String basecode) {
        this.basecode = basecode;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Refertype refertype = (Refertype) o;

        if (refertypeid != null ? !refertypeid.equals(refertype.refertypeid) : refertype.refertypeid != null)
            return false;
        if (basecode != null ? !basecode.equals(refertype.basecode) : refertype.basecode != null) return false;
        if (name != null ? !name.equals(refertype.name) : refertype.name != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = refertypeid != null ? refertypeid.hashCode() : 0;
        result = 31 * result + (basecode != null ? basecode.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }
}
